<!DOCTYPE html>
<html lang="en">

<head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>01dom</title>
</head>

<body>
        <ul>
                <li></li>
                <li></li>
                <li></li>
        </ul>
        DOM Document object model 文件对象模型
        DOM 对象 宿主对象
        js的三种对象
        1、 本地对象 Native object
        object function array string number boolean
        error evalError syntaxError rangeError
        2、 内置对象 built-inobje
        Global Math
        本地对象和内置对象都是es的内部对象。
        3、 宿主对象 Host Object
        浏览器对象 BOM
        document DOM
        执行js脚本的环境提供的对象，浏览器对象
        DOM:通过浏览器提供的一套方法表示或者操作html和xml
        <script>
                var a = {
                        0: 0,
                        1: 1,
                        2: 2,
                        length: 3
                }
                console.log(Array.prototype.slice.call(a));
                console.log(Array.from(a));
                console.log(0.1 + 0.2 == 0.3);
                console.log(NaN == NaN);
                console.log(NaN != NaN);
                console.log(window.isNaN('fsf'));
                console.log(Number.isNaN('fas'));
                var a = document.getElementsByTagName('li')
                console.log(Array.prototype.slice.call(a));
                console.log(Array.from(a));
                Object.a = 2;
                let b = {}
                console.log(b);
                // 1.07 连续乘以七个 1000
                var a = 1.07 * 1000 * 1000 * 1000 * 1000 * 1000 * 1000 * 1000;
                // 七个1000一共21位数字
                console.log(a.toString()); // "1.07e21"
                function t() {
                        var i = 1;
                        function a() {
                                console.log(i++)
                        }
                        a();
                };
             
                console.log("dfsdf");
        //        var a= t();
                t();
                t();
                var fibonacci = function(){
                        var memo=[0,1];
                        var fib=function(n){
                                debugger
                                var result=memo[n];
                                var i=0;
                                if(typeof result !== 'number'){
                                        console.log('第'+i++);
                                        result=fib(n-1)+fib(n-2);
                                        memo[n]=result;
                                }
                                return result;
                        }
                        return fib;
                }();
                console.log(fibonacci(4));
                console.log(fibonacci(4));
                console.log(fibonacci(4));

        </script>
</body>

</html>